import { defHttp } from "@/utils/http";

// ERP 公司信息API
export const companiesApi = {
	// 获得公司信息分页
	companiesList: async (params: any) => {
		return await defHttp.get({ url: `/his/companies/page`, params });
	},
	// 新增公司信息
	companiesCreate: async (data: any) => {
		return await defHttp.post({ url: `/his/companies/create`, data });
	},

	// 修改公司信息
	companiesUpdate: async (data: any) => {
		return await defHttp.put({ url: `/his/companies/update`, data });
	},

	// 删除公司信息
	companiesDelete: async (id: number) => {
		return await defHttp.delete({ url: `/his/companies/delete?id=` + id });
	}
};
